package com.zbkj.crmeb.finance.service.process;

import com.zbkj.crmeb.front.request.UserRechargeRequest;
import com.zbkj.crmeb.front.response.UserRechargePaymentResponse;
import com.zbkj.crmeb.front.service.UserCenterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;


/**
 * @ClassName: StoreRechargeProcess
 * @Description: 微信充值订单
 */
@Service("storeRechargeProcess")
public class StoreRechargeProcess implements IRechargeOrderProcess {
    public static final Logger logger = LoggerFactory.getLogger(StoreRechargeProcess.class);

    @Autowired
    private UserCenterService userCenterService;


    @Override
    public Map<String, Object> rechage(UserRechargeRequest request) {
        UserRechargePaymentResponse responseVo = userCenterService.recharge(request);

        Map<String, Object> map = new HashMap<>();
        map.put("data", responseVo);
        map.put("type", request.getFromType());
        return map;
    }
}
